package com.gbiac.modules.monitor.http;

import com.dtflys.forest.annotation.*;
import com.dtflys.forest.callback.OnLoadCookie;
import com.dtflys.forest.callback.OnSaveCookie;
import com.gbiac.modules.monitor.model.dto.*;

import java.io.File;

public interface HttpApi {
    /**
     * 请求设备唤醒/关闭人脸打卡-AI算能
     * @param aiDeviceSwitchParamDTO
     * @return
     */
    @Post(url = "http://60.204.142.18:7013/api/tripartite/face_recongize_task/",contentType = "application/json",dataType = "json")
    AiDeviceSwitchResponseDTO postOpenOrCloseAiDevice(@Body Object aiDeviceSwitchParamDTO);


    /**
     * 获取摄像头任务码-AI算能
     * @param cameraCode
     * @param abilityName
     * @return
     */
    @Get(url = "http://60.204.142.18:7013/api/tripartite/get_task_list/?camera_code={camera_code}&ability_name={ability_name}",dataType = "json")
    AiDeviceGetTaskCodeResponseDTO postGetTaskCodeAiDevice(@Var("camera_code")  String cameraCode,@Var("ability_name") String abilityName);

    /**
     * 开启/关闭行为检测-AI算能
     * @param aiDeviceSwitchTaskParamDTO
     * @return
     */
    @Put(url = "http://60.204.142.18:7013/api/tripartite/switch_task_status/",dataType = "json")
    AiDeviceSwitchTaskResponseDTO postSwitchTaskAiDevice(@JSONBody Object aiDeviceSwitchTaskParamDTO);



    /**
     * 新增员工人脸信息-AI算能
     * @param file 图片
     * @param staffName 员工号
     * @return
     */
    @Post(url = "http://60.204.142.18:7013/api/tripartite/add_staff_info/",contentType = "multipart/form-data",dataType = "json")
    AiDeviceAddStaffResponseDTO postAddStaffAiDevice(@DataFile("img_file") File file,@Body("staff_name") String staffName);

    /**
     * 删除员工人脸信息-AI算能
     * @param aiDeviceDeleteStaffParamDTO
     * @return
     */
    @Delete(url = "http://60.204.142.18:7013/api/tripartite/delete_staff_info/",dataType = "json")
    AiDeviceDeleteStaffResponseDTO postDeleteStaffAiDevice(@JSONBody Object aiDeviceDeleteStaffParamDTO);


    /**
     * 设备登录-掌静脉
     * @param palmVeinDeviceLoginParamDTO
     * @return
     */
    @Post(url = "http://192.168.3.41:8080/api/v1/auth/login",contentType = "application/json",dataType = "json")
    PalmVeinDeviceLoginResponseDTO postPalmVeinLogin(@Body PalmVeinDeviceLoginParamDTO palmVeinDeviceLoginParamDTO, OnSaveCookie onSaveCookie);

    /**
     * 上传图片-掌静脉
     * @param file 图片文件
     * @param filename 文件名
     * @return
     */
    @Post(url = "http://192.168.3.41:8080/api/v1/person/image/upload",contentType = "multipart/form-data",dataType = "json")
    PalmVeinDeviceUploadImageReponseDTO postPalmVeinUploadImage(@DataFile("file") File file, OnLoadCookie onLoadCookie);

    /**
     * 添加人员-掌静脉
     * @param palmVeinDeviceAddPersonParamDTO 人员信息
     * @return
     */
    @Post(url = "http://192.168.3.41:8080/api/v1/person",dataType = "json")
    PalmVeinDeviceAddPersonReponseDTO postPalmVeinAddPerson(@JSONBody PalmVeinDeviceAddPersonParamDTO palmVeinDeviceAddPersonParamDTO, OnLoadCookie onLoadCookie);
    /**
     * 删除人员-掌静脉
     * @param id 人员ID
     * @return
     */
    @Delete(url = "http://192.168.3.41:8080/api/v1/person/{id}",dataType = "json")
    PalmVeinDeviceDeleteImageReponseDTO postDeletePersonPalmVeinDevice(@Var("id") String id, OnLoadCookie onLoadCookie);
}
